<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.PasswordField?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?>

<VBox alignment="CENTER" spacing="20.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="org.academiadecodigo.bootcamp.controller.LoginController">
    <children>
        <ImageView fitHeight="150.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true">
            <image>
                <Image url="@/logo.png" />
            </image>
        </ImageView>
        <GridPane fx:id="gridPane" alignment="CENTER" hgap="10.0" maxHeight="180.0" maxWidth="400.0" minHeight="90.0" minWidth="200.0">
            <columnConstraints>
                <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
                <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
            </columnConstraints>
            <rowConstraints>
                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
                <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
            <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
            </rowConstraints>
            <children>
                <Label text="code cadet_" GridPane.halignment="RIGHT" />
                <TextField fx:id="usernameField" GridPane.columnIndex="1" />
                <Label text="password_" GridPane.halignment="RIGHT" GridPane.rowIndex="1" />
                <PasswordField fx:id="passwordField" GridPane.columnIndex="1" GridPane.rowIndex="1" />
            <Label fx:id="emailLabel" text="email_" GridPane.halignment="RIGHT" GridPane.rowIndex="2" />
            <TextField fx:id="emailField" GridPane.columnIndex="1" GridPane.rowIndex="2" />
            </children>
            <VBox.margin>
                <Insets left="20.0" right="20.0" />
            </VBox.margin>
        </GridPane>
        <Button fx:id="loginButton" contentDisplay="CENTER" defaultButton="true" mnemonicParsing="false" onAction="#onButton" text="Login" textAlignment="CENTER" />
      <Label fx:id="registerLabel" onMouseClicked="#onLink" text="Register" underline="true" />
      <Label fx:id="errorLabel" text="console.log(&quot;something is wrong&quot;);" textFill="RED" />
    </children>
   <padding>
      <Insets bottom="30.0" left="30.0" right="30.0" top="30.0" />
   </padding>
</VBox>
